
import java.util.Calendar;

/**
 * A class which represents a shift for a driver.
 * 
 * This differs from a normal shift in the way that it contains
 * a bus used by the Driver for the shift.
 * @version 1.0
 */
public class DriverShift extends Shift
{
    private BusShift busShift;
    private Driver driver;
    
    public DriverShift(Calendar startTime, Calendar endTime, BusShift busShift, Driver driver)
    {
        super(startTime, endTime);
        this.busShift = busShift;
        this.driver = driver;
    }

    @Override
    public String toString() {
        return "DriverShift{" + "busShift=" + busShift + "driver=" + driver + '}';
    }


    public void setDriver(Driver driver)
    {
        this.driver = driver;
    }

    public BusShift getBusShift() {
        return busShift;
    }

    public Driver getDriver() {
        return driver;
    }

    public Service getService() {
        return busShift.getService();
    }


    public static void main(String[] args)
    {
        /*Calendar start1 = Calendar.getInstance();
        Calendar start2 = Calendar.getInstance();
        DriverShift shift = new DriverShift()*/
    }
    
}
